<template>
  <div class="news">
    <img :src="a ? a : '../static/news2.jpg'" alt="" />
  </div>
</template>

<script>
export default {
  data() {
    return {
      a: ''
    }
  },
  mounted() {
    console.log(this.$route.query.src)
    this.a = this.$route.query.src
    
  }
}
</script>

<style scoped>
/* .news{
    background-image: url('../images/news1.jpg');
    background-size: cover;
} */
img {
  width: 100%;
  height: 100%;
}
</style>